#include "mainwindow.h"
#include "namewindow.h"
#include "workwindow.h"
#include "subtasks.h"
//#include "variable.h"
#include <QtGui>
#include <iostream>
int main(int argc, char *argv[]) {
     QApplication app(argc, argv);
     MyDialog *mainWin = new MyDialog();
     bool connect = mainWin->checkFileConnection();
     if (!connect){
         mainWin->show();
     }
     else {
         int checkUser = mainWin->checkFileUser();
         if (checkUser <= 0){
             CheckName *loginWindow = new CheckName();
             loginWindow->show();
         }
         else{
             MainWindo *WorkWindow = new MainWindo(0,checkUser, false);
             std::cout << checkUser<<"bbb" <<std::endl;
             WorkWindow->show();
         }
     }

     //secondWin->show();
     //QObject::connect(MyDialog::btnConOtmena, SIGNAL(clicked()), &app, SLOT(quit()));
     return app.exec();
 }
